<!DOCTYPE html>
<!-- saved from url=(0024)https://candy.one/invite -->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>


    <title>Candy Box - All Candies in One Box</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
	
    <!--<link rel="shortcut icon" th:href="@{https://candy-s.futurity.cn/ui/favicon.ico} "/>-->
    <link rel="stylesheet" th:href="@{../css/AIT/candybox/bootstrap.css}"/>
    <link rel="stylesheet" th:href="@{../css/AIT/candybox/base.css}"/>
    <link rel="stylesheet" th:href="@{../css/AIT/candybox/my_about.css}"/>

    <script th:src="@{../js/AIT/candybox/analytics.js.下载}"/>
    <script th:src="@{../js/AIT/candybox/bootstrap.min.js.下载}"/>


    <script th:src="@{../libs/jquery.min.js}"/>
    <script th:src="@{../plugins/layer/layer.js}"/>
    <script th:src="@{../libs/bootstrap.min.js}"/>
    <script th:src="@{../libs/vue.min.js}"/>
    <script th:src="@{../libs/validator.min.js}"/>


    <script>
        $(function () {
            //初始化记载
            loadtoken();
        });


        function loadtoken() {
            //获取用户邮箱。用以查询相关信息
            var registerMail = $("#registerMailInfo").val();

            $.ajax({
                //url:baseUrlHL + "/app/index/openOrder?userid="+userid,    //请求的url地址
                url:"/candybox/tokenInfo?registerMail="+registerMail,    //请求的url地址
                dataType:"json",   //返回格式为json
                async:false,//请求是否异步，默认为异步，这也是ajax重要特性
                type:"GET",   //请求方式
                success:function(data){
                    //所有用户的币数量总和
                    var userCandyCount = data.data.userCandyCount;
                    var tb = '';
                    var totalAmount = 0;
                    for(var i = 0 ;  data.data.list.length > i ;i++) {
                        var simplename = data.data.list[i].simplename;
                        var fullname = data.data.list[i].fullname;
                        var amount = data.data.list[i].amount;
                        var price = data.data.list[i].price;

                        totalAmount += amount;

                        tb += '<tr>';
                        tb += '<td>';
                        tb += '<img src="../img/AIT/candybox/'+simplename+'.png" width="36" />';
                        tb += '<span class="color_black">'+simplename+'</span> <span class="formobile">('+fullname+')</span>';
                        tb += '</td>';
                        tb += '<td>'+amount+'</td>';
                        tb += '<td>'+price+'</td>';
                        tb += '</tr>';
                    }

                    $("#tokentb").html(tb);
                    $("#totalAmount").html("Value:≈"+totalAmount+"USD");

                    $("#total").text(userCandyCount);
////
                }
            });

        }

    </script>

</head>

<body>
<header class="navbar navbar-inverse navbar-fixed-top visible-d">
    <div class="navbar-header">
        <!-- responsive nav button -->
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </button>
        <!-- /responsive nav button -->
        <!-- /logo -->
        <a class="navbar-brand" href="#">
            <img th:src="@{../img/AIT/candybox/logo.png}" width="51px" class="logo"/>
            <div class="logo_escription">
                <p class="logo_title">AIT</p>
                <p class="logo_sub" style="font-size: 10px;">Artificial Intelligence Data Credit Value Token</p>
            </div>
        </a>
    </div>
    <!-- main nav -->
    <nav class="collapse navbar-collapse navbar-right" role="Navigation">
        <ul id="nav" class="nav navbar-nav">
            <li class="visible-xs"><a href="">Candy Box</a>
            </li>
            <!--<li class="visible-xs"><a href="https://candy.one/invite">Invite Friends</a></li>-->
            <li class="visible-xs"><a href="">About</a></li>
            <li class="login_name hidden-xs hidden-sm">
                <p th:text="${#httpServletRequest.getAttribute('registerMail')}"></p>
                <input type="hidden" id="registerMailInfo"  th:value="${#httpServletRequest.getAttribute('registerMail')}"/>
                <p>LOGGED IN AS</p>
                <span class="line"></span>
            </li>
            <li>
                <a href="" class="exit">
                    <img th:src="@{../img/AIT/candybox/exit.png}" width="18px" class="hidden-xs"/>
                    <p>Exit</p>
                    <p class="visible-xs importantfr">8615928991751</p>
                </a>
            </li>
        </ul>
    </nav>
</header>

<div class="left_nav">
    <ul>
        <li><a th:href="@{'/candyboxbis/invitefriendsPage?registerMail='+ ${#httpServletRequest.getAttribute('registerMail')}}">AIT</a></li>
        <!--<li><a href="https://candy.one/invite">Invite Friends</a></li>-->
        <li><a th:href="@{'/candyboxbis/candyboxPage?registerMail='+ ${#httpServletRequest.getAttribute('registerMail')}}">stand by</a></li>
    </ul>
</div>

<div class="right_content">
    <p class="panel_title">stand by</p>
    <p class="description hidden-xs"></p>
    <div id="all">
        <p class="color_eee ptitle">The total number of issued</p>
        <div class="amount">
            <div class="am_num">
                <div id="total">
                    <span class="t_num t_num1"><i style="background-position: 0px 0px;"></i><i
                            style="background-position: 0px 0px;"></i><i style="background-position: 0px -232px;"></i><i
                            style="background-position: 0px 0px;"></i><i style="background-position: 0px -174px;"></i><i
                            style="background-position: 0px -58px;"></i><i style="background-position: 0px -464px;"></i><i
                            style="background-position: 0px -522px;"></i><i
                            style="background-position: 0px -232px;"></i><i
                            style="background-position: 0px -232px;"></i></span>
                </div>
            </div>
        </div>
    </div>
    <div class="panel_tabel">
        <div class="total" id = "totalAmount">Value:≈24,089,665.45USD</div>
        <table>
            <thead>
            <tr>
                <th>Name</th>
                <th>Amount</th>
                <th>Price (USD)</th>
            </tr>
            </thead>
            <tbody id = "tokentb">
            </tbody>
        </table>
    </div>
</div>


<script>
    /*<![CDATA[*/
//    $("#phone").intlTelInput({
//        // allowDropdown: false,
//        // autoHideDialCode: false,
//        autoPlaceholder: "polite",
//        // dropdownContainer: "body",
//        // excludeCountries: ["us"],
//        formatOnDisplay: true,
//        geoIpLookup: function (callback) {
//            $.get("http://ipinfo.io", function () {
//            }, "jsonp").always(function (resp) {
//                var countryCode = (resp &amp;&amp; resp.country) ? resp.country : "";
//                callback(countryCode);
//            });
//        },
//        initialCountry: "cn",
//        // nationalMode: false,
//        // onlyCountries: ["us", "gb", "ch", "ca", "do"],
//        placeholderNumberType: "MOBILE",
//        preferredCountries: ["cn", "jp", "us", "tw"],
//        // separateDialCode: true,
//        utilsScript: "https://candy-s.futurity.cn/ui/component/country_picker/build/js/utils.js"
//    })

    // 滚动数量

//    $(function () {
//        get_candy_num();
//        setInterval(function () {
//            get_candy_num();
//        }, 10000);
//    });
//
//
//    function show_candy_num(n) {
//        var it = $(".t_num1 i");
//        var len = String(n).length;
//        for (var i = 0; i < len; i++) {
//            if (it.length <= i) {
//                $(".t_num1").append("<i></i>");
//            }
//            var num = String(n).charAt(i);
//            //根据数字图片的高度设置相应的值
//            var y = -parseInt(num) * 58;
//            var obj = $(".t_num1 i").eq(i);
//            obj.animate({
//                backgroundPosition: '(0 ' + String(y) + 'px)'
//            }, 'slow', 'swing', function () {
//            });
//        }
//        $("#cur_num").val(n);
//    }

//    function get_candy_num() {
//        $.get("/g/candy", {}, function (data) {
//            // alert(data.result);
//            var num = data.result
//            var fix_length = 11;
//            var pre_str = "";
//            for ($i = num.length; $i < fix_length; $i++) {
//                pre_str = pre_str + "0";
//            }
//            num = pre_str + num;
//            show_candy_num(num);
//        }, "json");
//    }

    /*]]>*/
</script>

</body>
</html>